package com.liujit.bms.admin.controller;

import com.liujit.bms.admin.domain.query.BlogMemberReadRecordQuery;
import com.liujit.bms.admin.domain.result.BlogMemberReadRecordResult;
import com.liujit.bms.admin.service.BlogMemberReadRecordService;
import com.liujit.common.domain.result.PageBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description 博客会员浏览记录管理接口
 * @Author liujun
 * @Date 2021-07-19 17:50:42
 */
@RequiredArgsConstructor
@Api(tags = "博客会员浏览记录管理接口")
@RestController
@RequestMapping("/blog/member/read/record")
public class BlogMemberReadRecordController {

    private final BlogMemberReadRecordService blogMemberReadRecordService;

    @ApiOperation(value = "分页查询", notes = "根据博客会员浏览记录分页查询条件，分页查询博客会员浏览记录列表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "query", value = "博客会员浏览记录分页查询条件", dataType = "BlogMemberReadRecordQuery", dataTypeClass = BlogMemberReadRecordQuery.class, paramType = "query") })
    @GetMapping("/getPage")
    public PageBean<BlogMemberReadRecordResult> getPage(BlogMemberReadRecordQuery query) {
        return blogMemberReadRecordService.getPage(query);
    }
}
